package work.jame.blog.framework.result;

/**
 * websocket返回封装类
 * @author Jame!
 * @date 2023/5/25 下午 8:40
 */
public class WebSocketResult {

    /**
     * 当前返回的消息类型
     * updateCurrentOnLineUserCount  更新当前在线用户
     * sendBulletScreen  发送弹幕
     */
    private String type;

    private Object data;

    public WebSocketResult() {
    }

    public WebSocketResult(String type, Object data) {
        this.type = type;
        this.data = data;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "WebSocketResult{" +
                "type='" + type + '\'' +
                ", data=" + data +
                '}';
    }
}
